<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <!-- v-on 事件绑定 绑定事件 -->
    <div id="app">
        <div>{{msg}}</div>
        <button @click="handle">点击</button>
    </div>

    <script src="./vue.js"></script>
    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                msg: 0,
            },
            methods: {
                handle: function() {
                    this.msg += 1;
                },
            },
        });
    </script>
</body>

</html>